home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / laptop-mode-tools / modules / hal-polling < prev    next >
Text File  |  2009-10-06  |  797b  |  39 lines

  1. #! /bin/sh
  2. #
  3. # Laptop mode tools module: change HAL polling mode
  4. #
  5.  
  6.  
  7. # Some backward compatibility for version 1.42
  8. if [ x$BATT_ENABLE_HAL_POLLING  = x1 ] ; then
  9.     BATT_DISABLE_HAL_POLLING=0
  10. else
  11.     BATT_DISABLE_HAL_POLLING=1
  12. fi
  13. if [ x$AC_ENABLE_HAL_POLLING  = x1 ] ; then
  14.     AC_DISABLE_HAL_POLLING=0
  15. else
  16.     AC_DISABLE_HAL_POLLING=1
  17. fi
  18.  
  19.  
  20.  
  21.  
  22. if [ x$CONTROL_HAL_POLLING = x1 ] ; then
  23.     DISABLE_HAL_POLLING=$BATT_DISABLE_HAL_POLLING
  24.     if [ $ON_AC -eq 1 ] ; then
  25.         DISABLE_HAL_POLLING=$AC_DISABLE_HAL_POLLING
  26.     fi
  27.     if [ x$DISABLE_HAL_POLLING = x1 ] ; then
  28.         DISABLE_HAL_POLLING_CMD="hal-disable-polling --device"
  29.     else
  30.         DISABLE_HAL_POLLING_CMD="hal-disable-polling --enable-polling --device"
  31.     fi
  32.  
  33.     for DEV in $HAL_POLLING_DEVICES ; do
  34.         if [ -b "$DEV" ] ; then
  35.             $DISABLE_HAL_POLLING_CMD "$DEV"
  36.         fi
  37.     done
  38. fi
  39.